Computable General Equilibrium (CGE) modeling
 
·               A CGE model is basically a large set of demand and supply functions that cover every market (both for commodities and factors) in the economy.
·               The main reason to use a CGE model is to provide a quantitative evaluation of the effects of government policies. 
·               The principal advantage of using CGE model in policy analysis, rather than some partial equilibrium model, is that it permits taking into account interactions throughout the economy in a consistent manner. 
·               A CGE model works by using data to describe the economy in a benchmark year, and by then varying one or more elements so as to “shock” the economy and change the values of data items. Finally the model then compares the new (counterfactual) and original (benchmark) values for the economy as a whole and for each component.
·               The benchmark of a CGE is actually a solution of the model that replicates the observed economic data in some (basic) year). By “replicates” we mean that it reproduce the observed economic transactions in our database.
·               The task of replicating parameters in a CGE so that it successfully replicates the benchmark year is called CALIBRATION and is akin to the estimation stage in building macroeconomic forecasting models.
·               A CGE model is developed by combining multi-sectoral database of an economy with computer software the simulates the functioning and reactions of the economy. The typical database for this purpose is a Social Accounting Matrix (SAM).
 
 
 
GAMS – General Algebraic Modeling System 
(this software package can be used directly for setting up and solving CGE models).
 
MPSGE – Mathematical Programming System for General Equilibrium Models
(this software package is a specialized GAMS module which dramatically simplifies the specification and modification of CGE models.
 
 
An available solution procedure in GAMS:
 
LP                          linear programming 
NLP                       nonlinear programming
MIP                        mixed integer programming
RMIP                     relaxed mixed integer programming
MINLP                  mixed integer nonlinear programming
RMINLP                               relaxed mixed integer nonlinear programming
MCP                      mixed complementarily programming
MPEC                    mathematical programs with equilibrium constraints
CNS                       constrained nonlinear systems
 
 
Some useful general remarks for GAMS:

 

(1)       Multiple lines per statement, embedded blank lines, and multiple statements per line are allowed.

(2)       You should terminate every statement with a semicolon (except lines started with $ symbol).

(3)       The GAMS compiler doe not distinguish between upper- and lower-case letters.

(4)       The names given to the entitles of the model must start with a letter and can be followed by up to nine more letters or digits.

(5)       The creation of GAMS entitles involves two steps: a declaration and an assignment / definition. “Declaration” means declaring the existence of something and giving it a name. “Assignment” or “definition” means giving something a specific value or dorm. In the case of equations you must make a declaration and definition in separate GAMS statements. For all other GAMS entitles, however, you have the option of making declaration and assignments in the same statement or separately.

 

 

Steps in writing GAMS model:

 

  1. The first step in writing a GAMS model is to provide the constant elements (data that are not determined within the model, but they have a fixed value that you have to provide). You can do it using the SCALARS and the PARAMETERS statements. You must:

o       declare them in the form of a list (you may write some explanatory text on the meaning but this is not necessary),

o       close it with the semicolon (you do not write semicolon after each line but only after the last line of the block with declaration),

o       and then (in a new section) you have to define the values and close each of them with a semicolon. Data can be introduced as scalars - single parameters - and as tables - vector parameters.

 

  1. Next section lists the variables (endogenous only) that will be determined by solving the model. You start it with a VARIABLES statement. Each variable is give a name, a domain if appropriate, and text optionally. Once declared, every variable must be assigned a type: free, positive, negative, binary, integer. The lower and upper bounds of a variable are set automatically according to the variable's type, but these bounds can be overwritten by the GAMS user:

o       UP  - to assign an upper bound

o       LO - to assign a lower bound

o       FX - to assign a fixed value

o       L - to assign an initial level

The objective variable (any optimization model has to contain one such variable to serve as the quantity to be minimized) is declared without a domain (free type) and has to be a scalar.   

 

  1. In the third section, you define an EQUATIONS statement. The equations are first declared and then specified. An equation definition must contain variables and we can use one of the three relational operators: "=L=", "=G=", "=E=", but never  a direct assignment "=". The equations need not be defined in the same order in which they are declared.

 

  1. You have to provide a name to your model. The word "model" has a precise meaning in GAMS - it is a collection of equations. The format of the declaration

o       is the keyword MODEL

o       followed by the name of the model

o       followed by a list of equation names enclosed in "/    /" brackets. If all previously defined equations are to be included, you can enter "/ALL/" instead of the explicit list.

 

5.      Once a model has been declared and assigned equations, we are ready to call the solver. This is done with a SOLVE statement. The format of the solve statement

o       is the keyword SOLVE

o       the name of the model to be solved

o       the keyword USING

o       an available solution procedure

o       the keyword MINIMIZING or MAXIMIZING

o       the name of the objective variable.